import org.hibernate.validator.constraints.ru.INN;

import java.util.Scanner;

public class ReplaceCharacters {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);// 创建Scanner对象
        System.out.println("请输入行数：");
        int n = scanner.nextInt();
        scanner.nextLine(); // 添加这一行来消耗掉换行符
        System.out.println("请输入一串字符：");
        String str = scanner.nextLine();// 读取一行文本输入
        if(n>=0&&n<10)
        {
//            String string = str.replace("l","1");
//            for (int i = 0;i < n;i++)
//            {
//                System.out.println(string);
//            }
            StringBuilder result = new StringBuilder();
            for(int i=0;i<str.length();i++)
            {
                char currentChar = str.charAt(i);
                if(currentChar == 'l')
                {
                    result.append('1'); // 将字符'l'替换为字符'1'
                }
                else
                {
                    result.append(currentChar);
                }
            }
            System.out.println(result);
        }
        else {
            System.out.println("请根据规范输入行数");
        }
        scanner.close();// 关闭Scanner对象
    }
}